Api.GetSlaveById method
Gets detailed information from a specified slave using an ID.
Namespace: IntervalZero.KINGSTAR.Local.Api
Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0
Syntax
public KsReturn<SlaveStatus> GetSlaveById(
int Index
)
Public Function GetSlaveById(
Index As Integer
) As KsReturn(Of SlaveStatus)
Parameters
Index
Type: int
The slave index. This index value is automatically assigned by the KINGSTAR master when the EtherCAT network starts, based on the physical connection order. The first device connected directly to the master is assigned Index 0, followed by Index 1, Index 2, and so on. These indexes remain consistent within the slave array even if devices are added, removed, or reconnected. Please refer to the use cases in HotConnect, Repair, and Restart for more details.
Return value
Type: KsReturn<SlaveStatus>
Returns a KsError code and a SlaveStatus value.
Remarks
Retrieves details about a specified slave using the slave’s position in the EtherCAT loop. Since it uses the slave ID, it doesn't use the alias information. It works only for real slave modules without separating axes or I/Os. Use after the KINGSTAR Subsystem starts.
Usable EtherCAT states
ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP
Examples
N/A
See also